# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
  def es_admin?
    not session[:user_id].nil?
  end
  
  def en_euros( num )
    number_to_currency( num, :unit => "&euro;", :separator => ",", :delimiter => ".", :format => "%n %u" )
  end
  
  def current_pedido
    Pedido.find_by_id( session[ :pedido_id ] )
  end
  
  def title( page_title )
    content_for(:title) { page_title }
  end
end


